package day0221;

public class Test2Month {
    public static void main(String[] args) {
        //类型名   代词=     类型名.数值;
        Month monthValueNow=Month.December;
        switch (monthValueNow){//byte short char int  String  枚举
            case January: System.out.println("1月");break;
            case February: System.out.println("2月");break;
            case March: System.out.println("3月");break;
            case April: System.out.println("4月");break;
            case May: System.out.println("5月");break;
            case June: System.out.println("6月");break;
            case July: System.out.println("7月");break;
            case August: System.out.println("8月");break;
            case September: System.out.println("9月");break;
            case October: System.out.println("10月");break;
            case November: System.out.println("11月");break;
            case December: System.out.println("12月");break;
            default: System.out.println("月份超范围");break;
            //如果switch变量值和所有case后的数据都不相等就执行default
        }
    }
}
